import React from 'react';
import { Button } from 'antd';
import { useNavigate } from 'react-router';
import Space from 'src/components/Space';
import './index.less';

export default function Home() {
  const navigator = useNavigate();
  const goToPage = (path: string) => {
    navigator(path);
  };

  return (
    <div className="home">
      <Space>
        <Button onClick={() => goToPage('/space')}>Space</Button>
        <Button onClick={() => goToPage('/row')}>Row</Button>
        <Button onClick={() => goToPage('/col')}>Col</Button>
      </Space>
    </div>
  );
}
